
#include <vector>

using namespace std;

class Solution {
public:
    void moveZeroes(vector<int>& nums) {

        auto i = nums.begin();
        auto j = nums.begin();

        while (i != nums.end())
        {
            if (*i != 0)
            {
                *j = *i;
                j++;
            }
            i++;
        }
        while (j != nums.end())
        {
            *j++ = 0;
        }

    }
};



int main(void)
{
    

    vector<int> v = { 0,1,0,3,12};
    Solution s;
    s.moveZeroes(v);



    return 0;
}
